package com.wc.data_structures.tree;

/**
 * @Author congge
 * @Date 2023/4/24 22:52
 * @description 线索二叉树
 */
public class ThreadedBinaryTreeNode<T> {
    /**
     * 标志左节点是前驱节点还是左子树
     * 0 表示是左节点  1 表示是前驱结点
     */
    public int leftType;

    /**
     * 标志右节点是后继节点还是右子树
     * 0 表示是右节点  1 表示是后继结点
     */
    public int rightType;

    public ThreadedBinaryTreeNode<T> pre = null;

    public ThreadedBinaryTreeNode<T> left;

    public ThreadedBinaryTreeNode<T> right;

    public T value;

    public ThreadedBinaryTreeNode() {

    }

    public ThreadedBinaryTreeNode(T value) {
        this.value = value;
    }



}
